Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Application Role Connection Metadata #836

Merged
merged 1 commit into from
Jul 7, 2023

Conversation

lukellmann
Copy link
Member

The DSL looks like this:

val records = kord.updateApplicationRoleConnectionMetadataRecords {
    record(
        type = BooleanEqual,
        key = "member",
        name = "Member of the secret circle",
        description = "Must be a member of the secret circle",
    ) {
        name(Locale.GERMAN, "Mitglied im geheimen Kreis")
        description(Locale.GERMAN, "Muss ein Mitglied im geheimen Kreis sein")
    }
    record(
        type = DateTimeLessThanOrEqual,
        key = "account_age",
        name = "Account age",
        description = "Account must be at least this many days old",
    ) {
        name(Locale.GERMAN, "Account Alter")
        description(Locale.GERMAN, "Der Account muss zumindest so viele Tage alt sein")
    }
}
println(records)

Note that this does not contain the ability to update the application role connection for a user as it requires an OAuth2 access token which Kord doesn't support.

see discord/discord-api-docs#5668

The DSL looks like this:
val records = kord.updateApplicationRoleConnectionMetadataRecords {
    record(
        type = BooleanEqual,
        key = "member",
        name = "Member of the secret circle",
        description = "Must be a member of the secret circle",
    ) {
        name(Locale.GERMAN, "Mitglied im geheimen Kreis")
        description(Locale.GERMAN, "Muss ein Mitglied im geheimen Kreis sein")
    }
    record(
        type = DateTimeLessThanOrEqual,
        key = "account_age",
        name = "Account age",
        description = "Account must be at least this many days old",
    ) {
        name(Locale.GERMAN, "Account Alter")
        description(Locale.GERMAN, "Der Account muss zumindest so viele Tage alt sein")
    }
}
println(records)

Note that this does not contain the ability to update the application
role connection for a user as it requires an OAuth2 access token which
Kord doesn't support.

see discord/discord-api-docs#5668
@DRSchlaubi
Copy link
Member

Mitglied im geheimen Kreis lmao

@lukellmann lukellmann changed the base branch from 0.9.x to main June 17, 2023 13:53
@DRSchlaubi DRSchlaubi self-requested a review July 7, 2023 00:58
@DRSchlaubi DRSchlaubi merged commit d9a114b into main Jul 7, 2023
@DRSchlaubi DRSchlaubi deleted the role-connection-metadata branch July 7, 2023 12:17
@lukellmann lukellmann mentioned this pull request Aug 5, 2023
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants